Skip to content

[PIX] Recompute shader flags after NURI instrumentation - #8846

Open
Damyan Pepper (damyanp) wants to merge 1 commit into
mainfrom
users/damyanp/pix-fixes-05
Open

Damyan Pepper (damyanp) wants to merge 1 commit into
mainfrom
users/damyanp/pix-fixes-05

Conversation

@damyanp

@damyanp Damyan Pepper (damyanp) commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

Part 5 of 14 in the PIX instrumentation stack. It targets users/damyanp/pix-fixes-04. Its content depends on PR 3, which changes the same pass and the same cleanup path.

The non-uniform resource index pass inserts WaveActiveAllEqual to test whether a dynamic index is uniform. It inserts these calls after the compiler computed the shader flags. The module can therefore declare no wave operations and still contain them, and the validator refuses that module.

The pass computes the flags again, but only when it changed the module.

Assisted-by: Copilot

This changes only the PIX instrumentation, so it needs no release note.


Stack created with GitHub Stacks CLI • Give Feedback 💬

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Recomputes DXIL shader flags after PIX NURI instrumentation inserts wave operations.

Changes:

  • Recollects shader flags before metadata re-emission.
  • Adds regression validation for the WaveOps flag.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lib/DxilPIXPasses/DxilNonUniformResourceIndexInstrumentation.cpp Recomputes shader flags after instrumentation.
tools/clang/unittests/HLSL/PixTest.cpp Tests instrumented module validation and wave-op insertion.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/clang/unittests/HLSL/PixTest.cpp Outdated
VERIFY_IS_FALSE(IsPermittedValidationException(realDiagnostic));
}

TEST_F(PixTest, Validation_NonUniformResourceIndex_WaveOpsFlag) {
Copilot AI review requested due to automatic review settings September 29, 2026 02:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation and regression coverage address the invalid shader flags, with only minor style feedback remaining.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)

Copilot AI review requested due to automatic review settings September 29, 2026 16:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The stated shader-flag recomputation is unchanged context, so the intended functional fix is absent from this diff.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Diff omits the stated shader flag recomputation change

lib/​DxilPIXPasses/​DxilNonUniformResourceIndexInstrumentation.cpp:164

The described behavior change is not present in this diff: CollectShaderFlagsForModule() on the following line is unchanged context, so this hunk only adds a comment around behavior already in the target. Please update/rebase the stack so the actual recomputation change is included in this PR (or revise the PR scope if the implementation belongs to an earlier stack entry); otherwise merging this PR cannot deliver the stated fix.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 00:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The new DXIL 1.6 test needs the established version guard to avoid failures with older validators.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)

Base automatically changed from users/damyanp/pix-fixes-04 to main October 1, 2026 21:46
Copilot AI balanced review requested due to automatic review settings October 1, 2026 21:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The new test unconditionally requires DXIL 1.6 and can fail with older supported compiler or validator configurations.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)

The non-uniform resource index pass inserts WaveActiveAllEqual after the shader flags were computed, so the module could contain wave operations it does not declare and fail validation. Recompute the flags when the pass changes the module.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 40dc9de3-617e-4caf-ab0d-fba0a033ed93
Copilot AI balanced review requested due to automatic review settings October 1, 2026 22:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation correctly updates emitted flags and includes focused regression coverage.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

3 participants